package part17_策略模式_鸭子问题.策略加工厂解决ifelse;

import part17_策略模式_鸭子问题.策略加工厂解决ifelse.pojo.LeaveForm;

/**
 * @ClassName: LeaveServiceOld
 * @Author: AllenSun
 * @Date: 2023/2/11 下午9:40
 */
public class LeaveServiceOld {
    public void audit(LeaveForm leaveForm) {
        if(leaveForm.getDays()<=3 && leaveForm.getType()==1){
            System.out.println("三天以下婚丧假无需审批，自动通过");
        }
        if(leaveForm.getDays()>3 && leaveForm.getType()==1){
            System.out.println("三天以上婚丧假，进入上级审批流程");
        }
        if(leaveForm.getEmployee().getLevel()==9){
            System.out.println("总经理请假无需审批自动通过");
        }
        if(leaveForm.getDays()==1 && leaveForm.getType()==0){
            System.out.println("一天病假无需审批自动通过");
        }
        if(leaveForm.getDays()>1 && leaveForm.getType()==0){
            System.out.println("一天以上病假，进入上级审批流程");
        }
    }
}
